/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.AnalogChannel;
import edu.wpi.first.wpilibj.PIDSource;

/**
 *
 * @author Mentors  Carl Burger - Team 708
 */
public class PIDSourceProxy implements PIDSource {

    double pidInput = 0.0;
    AnalogChannel sensor;

    /**
     * Allocate a PIDSourceProxy object
     */

    public PIDSourceProxy (AnalogChannel sensor) {

        this.sensor = sensor;

    }


    /**
     * Get the voltage for use with PIDController.
     *
     * @return voltage instead of the averageValue which is returned by the AnalogChannel pidGet
     */
    public double pidGet() {
        return sensor.getVoltage();
    }

}